alter table jms_dm.dm_netmng_network_retention_agent_summary_dt
    set tblproperties ('external.table.purge' = 'true');
drop table jms_dm.dm_netmng_network_retention_agent_summary_dt;
create external table jms_dm.dm_netmng_network_retention_agent_summary_dt
(
    is_contain_difficult string comment '是否包含问题件1是2否',
    end_agent_code       string comment '末端网点所属代理区编码',
    end_agent_name       string comment '末端网点所属代理区名称',
    virt_code            string comment '虚拟代理区code',
    virt_name            string comment '虚拟代理区名称',
    need_sign_count_1d   int comment '1天应签收',
    retention_count_1d   int comment '1天内滞留',
    need_sign_count_2d   int comment '2天应签收',
    retention_count_2d   int comment '2天内滞留',
    need_sign_count_3d   int comment '3天应签收',
    retention_count_3d   int comment '3天内滞留',
    retention_count_4d   int comment '4天内滞留',
    need_sign_count_4d   int comment '4天应签收',
    need_sign_count_5d   int comment '5天应签收',
    retention_count_5d   int comment '5天内滞留',
    retention_count_6d   int comment '6天内滞留',
    need_sign_count_6d   int comment '6天应签收',
    need_sign_count_7d   int comment '7天应签收',
    retention_count_7d   int comment '7天内滞留',
    need_sign_over_7d    int comment '超7天应签收',
    retention_over_7d    int comment '超7天内滞留',
    date_time            string comment '分区日期'
) comment '代理区滞留同步oracle'
    partitioned by (dt string comment '日期')
    stored as parquet
    location '/dw/hive/jms_dm.db/external/dm_netmng_network_retention_agent_summary_dt'
;